package com.exam.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.exam.mapper.TestScoreMapper;
import com.exam.pojo.entity.TestScore;
import com.exam.service.TestScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TestScoreServiceImpl implements TestScoreService {
   @Autowired
    TestScoreMapper testScoreMapper;



    @Override
    public List<TestScore> findAll() {
        return testScoreMapper.findAll();
    }

    @Override
    public List<TestScore> findTestScore(String examName, String score) {
        return testScoreMapper.findTestScore(examName,score);
    }


    /*public List<TestScore> findAllName() {
        LambdaQueryWrapper<TestScore> testScoreLambdaQueryWrapper = new LambdaQueryWrapper<>();
        LambdaQueryWrapper<TestScore> select = testScoreLambdaQueryWrapper.select(TestScore::getExamName);
        return testScoreMapper.selectList(select);
    }*/


    public List<TestScore> findAllName2() {
        LambdaQueryWrapper<TestScore> testScoreLambdaQueryWrapper = new LambdaQueryWrapper<>();
        LambdaQueryWrapper<TestScore> testScoreLambdaQueryWrapper1 = testScoreLambdaQueryWrapper.select(TestScore::getScore);
        return testScoreMapper.selectList(testScoreLambdaQueryWrapper1);
    }
}
